Packet-based networking architecture is often described in terms of layers, where each layer is responsible for communicating with the same peer protocol running on an opposite machine and for providing services to the layer above it. The layered architecture, referred to as the Open System Interconnect (OSI) model, has been generally defined by the International Organization for Standardization. The layers of the OSI model include the physical layer (layer 1), the data link layer (layer 2), the network layer (layer 3), the transport layer (layer 4), the session layer (layer 5), the presentation layer (layer 6), and the application layer (layer 7). Layers of particular interest herein include layers 2, 3, and 4. Ethernet is a common layer 2 protocol in which packets are switched between network nodes (referred to as bridges or switches) in variable-length packets based on information in an Ethernet header. The Internet Protocol (IP) is a common layer 3 protocol in which variable-length packets are routed between network nodes (referred to as routers) based on information in an IP header. Transmission control protocol (TCP) and user datagram protocol (UDP) are common layer 4 protocols which provide an interface between layer 3 protocols and higher layer protocols. TCP is a connection-oriented protocol with features that provide reliable data delivery and UDP is a connectionless protocol that dispenses with the reliability services provided by TCP.
Traditionally, layer 2 switching was performed by switches and layer 3 routing was performed by routers, where the switches and routers were separate network nodes. However, newer systems, referred to as “switch/routers” and “layer 3 switches,” have been developed that have the ability to switch or route packets depending on the specific needs of each individual packet.
As packet-based network traffic continues to increase, there is a need to provide faster and more intelligent network nodes. Because of technological limitations and economic considerations, the implementation of faster and more intelligent components and sub-systems may not occur in parallel. For example, higher rate physical layer components, such as lasers and modulators, may be available before packet processors are developed that can handle the higher transmission rates. Because new components and sub-systems are not developed and implemented in parallel, there is often a need to interface between components and sub-systems that support different transmission rates. For example, ten 100 Megabit Ethernet (MbE) links can be used to create a 1 GbE connection between two 1 GbE switches.
A technique known as link aggregation is commonly used to connect two network nodes with multiple physical links in order to increase the transmission capacity between the two network nodes. Link aggregation involves combining multiple physical links into a single logical link with a distribution function at the transmitting node and a collection function at the receiving node. The distribution function involves receiving packets from a higher rate link and distributing the packets among multiple lower rate links and the collection function involves receiving the packets from the multiple lower rate links and combining the packets onto a single higher rate link.
Distributing packets from an incoming link to multiple output links involves mapping each packet to one of the multiple output links. Some types of packets require that all of the packets from a particular set of packets are maintained in the same order during packet distribution (in-order packets). A set of in-order packets is also referred to as a “conversation.” In contrast, other types of packets do not require that all of the packets from a particular set of packets are maintained in the same order during packet distributed (out-of-order packets). A set of packets is defined as a group of packets that have some similar characteristic (i.e., switched, routed, same flow, same MAC source address/destination address, same IP source address/destination address, same socket, etc.). An efficient way to maintain the order of a set of packets is to distribute all of the packets from the same set to the same output link. For example, FIG. 1 depicts a series of incoming packets from four different sets of packets (set A, set B, set C, and set D) that are distributed among three output links (output link 1, output link 2, and output link 3) by a packet distributor 102. The packets are distributed to the three output links such that packets from the same set are output to the same output link, thereby maintaining the original order of the packets within each set. Specifically, the set A packets are sent to output link 3, the set B packets are sent to output link 1, and the set C and D packets are sent to output link 2. Distributing packets from the same set to the same output link is typically accomplished by parsing out fields in the header of each packet and then applying a mapping algorithm to the parsed field(s). The same field(s) is/are parsed from each packet and the same mapping algorithm is applied to each packet. Mapping algorithms may include sampling bits from the parsed field(s) or performing a hash function, a modulo-n function, or some other manipulation on the bits in the parsed fields. Applying the same mapping algorithm to the same field(s) of each incoming packet ensures that packets from the same set are distributed to the same output link.
FIG. 2 depicts a packet distributor 202 that includes a parser 204 and a mapping module 206 that are used to generate an output link ID for each incoming packet. As shown in FIG. 2, the parser provides two fields, for example the layer 2 source address and destination address, to the mapping module and the mapping module generates a link ID that identifies the output of the packet.
While the approach to packet distribution described with reference to FIGS. 1 and 2 works well when all of the packets are in-order packets, applying the same mapping algorithm to the same field(s) of each incoming packet does not work as well in an environment where some packets are in-order packets and some of the packets are out-of-order packets. Specifically, the above-described approach does not offer the flexibility to apply different mapping algorithms to different types of packets. That is, using the above-described approach, the same mapping algorithm is applied to each incoming packet regardless of whether the packet is an in-order packet or an out-of-order packet. In systems that handle different types of packets, such as switch/routers, there are advantages to being able to distribute different types of packets differently. For example, out-of-order packets from the same set of packets could be distributed to different output links to create a more even traffic flow among the output links.
Although the distribution function of an aggregated link involves receiving packets from an input link and mapping the packets to an output link, the distribution function is different from well-known switching and routing functions. Specifically, switching and routing involve forwarding packets based on forwarding table look-ups that are performed using the layer 2 or layer 3 destination address in the packet headers. The distribution function does not involve forwarding table look-ups based on the layer 2 or layer 3 destination address. The distribution function is meant to be a simple and quick way to distribute packets among multiple output links that adds little delay to the packets.
There are other techniques for distributing packets among multiple aggregated output links that involve segmenting packets and distributing the packet segments among multiple output links at the transmitting node and then re-assembling the packet segments into packets at the receiving node. While these techniques work well, they require specific synchronized logic at both the transmitting node and the receiving node to ensure that the packet segments are properly re-assembled.
In view of the need to interface links of different transmission rates and the limitations of prior art packet distribution techniques, what is needed is an efficient technique for distributing packets to multiple output links that has the flexibility to handle different types of packets differently.